import request from '@/utils/request'

export const getDevice = (query) =>
  request({
    url: '/iot/device',
    method: 'get',
    params: query
  })
export const deviceStatus = (data) =>
  request({
    url: '/iot/device/status',
    method: 'put',
    data: data
  })

export const deviceQuota = (params) =>
  request({
    url: '/iot/device/deviceQuota',
    method: 'get',
    params
  })


export const deviceAddTag = (data) =>
  request({
    url: '/iot/device/tags/add',
    method: 'post',
    data
  })

export const deviceDeleteTag = (params) =>
  request({
    url: `/iot/device/tags/${params.sn}`,
    method: 'delete',
    params: {tag: params.tags}
  })
